home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / gfx / lise2.1 / lise / src / vect.c < prev   
Encoding:
C/C++ Source or Header  |  1993-03-31  |  569 b   |  38 lines

  1. #include <stdio.h>
  2. #ifdef AMIGA
  3. #include <gfxamiga.h>
  4. #else
  5. #include <gfx.h>
  6. #endif
  7.  
  8. help()
  9. {
  10. printf("draw a vector on the grafic screen\n");
  11. printf("vect x y [x2 y2] [options]\n");
  12. }
  13.  
  14. main(argc,argv)
  15. int argc;
  16. char *argv[];
  17. {
  18. int n,m,v[8];
  19. char z[80];
  20.  
  21.    n=checkopt(argc,argv,"-dummy",z);
  22.    tekopen();
  23.    m=0;
  24.    for(n=1;n<argc;n++) {
  25.       if(instr("-",argv[n])==-1) v[m++]=atoi(argv[n]);
  26.    }
  27.    if(m<4) {
  28.       vectoa(v[0],v[1]);
  29.       gfxflush();
  30.       exit(0);
  31.    }
  32.    posita(v[0],v[1]);
  33.    vectoa(v[2],v[3]);
  34.    gfxflush();
  35.    close(_tek4014);
  36.    return(0);
  37. }
  38.